/* 复用基础样式 */
.dashboard-container {
    min-height: 100vh;
    background: #f5f7fa;
  }
  
  .header {
    background: white;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  
  .header-left .logo {
    margin: 0;
    color: #1890ff;
    font-size: 20px;
    font-weight: 600;
  }
  
  .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  
  .admin-name {
    color: #666;
    font-size: 14px;
  }
  
  .logout-btn {
    background: #ff4d4f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
  }
  
  .logout-btn:hover {
    background: #ff7875;
  }
  
  .main-content {
    display: flex;
    min-height: calc(100vh - 64px);
  }
  
  .sidebar {
    width: 240px;
    background: white;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
  }
  
  .nav-menu {
    padding: 16px 0;
  }
  
  .menu-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
  }
  
  .menu-item:hover {
    background: #f0f2f5;
  }
  
  .menu-item.active {
    background: #e6f7ff;
    border-left-color: #1890ff;
    color: #1890ff;
  }
  
  .menu-item .icon {
    margin-right: 12px;
    font-size: 16px;
  }
  
  .content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
  }
  
  /* 页面特有样式 */
  .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }
  
  .page-header h2 {
    margin: 0;
    color: #262626;
    font-size: 24px;
    font-weight: 600;
  }
  
  .header-actions {
    display: flex;
    gap: 12px;
  }
  
  .preview-btn {
    background: #52c41a;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
  }
  
  .preview-btn:hover {
    background: #73d13d;
  }
  
  .save-btn {
    background: #1890ff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
  }
  
  .save-btn:hover:not(:disabled) {
    background: #40a9ff;
  }
  
  .save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .editor-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  
  .editor-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .editor-section h3 {
    margin: 0 0 20px 0;
    color: #262626;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
  }
  
  .section-desc {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
  }
  
  /* 轮播图网格样式 */
  .carousel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  
  .carousel-item {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
  }
  
  .carousel-item:hover {
    border-color: #1890ff;
  }
  
  .carousel-position {
    background: #f5f5f5;
    padding: 8px 12px;
    text-align: center;
    font-size: 12px;
    color: #666;
    font-weight: 500;
  }
  
  .carousel-image {
    position: relative;
    width: 100%;
    height: 150px;
  }
  
  .carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .carousel-image:hover .image-overlay {
    opacity: 1;
  }
  
  .change-btn, .remove-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
  }
  
  .change-btn {
    background: #1890ff;
    color: white;
  }
  
  .change-btn:hover {
    background: #40a9ff;
  }
  
  .remove-btn {
    background: #ff4d4f;
    color: white;
  }
  
  .remove-btn:hover {
    background: #ff7875;
  }
  
  .upload-placeholder {
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  .upload-placeholder:hover {
    background: #fafafa;
  }
  
  .upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
  }
  
  .upload-placeholder p {
    margin: 4px 0;
    color: #666;
    font-size: 14px;
  }
  
  .upload-tip {
    font-size: 12px !important;
    color: #999 !important;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
  }
  
  .form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
  }
  
  .form-input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
  }
  
  .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
  }
  
  .form-textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
  }
  
  .feature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .feature-item {
    padding: 20px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background: #fafafa;
  }
  
  .remove-btn {
    background: #ff4d4f;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 12px;
  }
  
  .remove-btn:hover {
    background: #ff7875;
  }
  
  .add-btn {
    background: #1890ff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
  }
  
  .add-btn:hover {
    background: #40a9ff;
  }
  
  .image-upload {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
  }
  
  .image-upload:hover {
    border-color: #1890ff;
  }
  
  .current-image {
    position: relative;
  }
  
  .current-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
  }
  
  .remove-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 77, 79, 0.9);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
  }
  
  .upload-area {
    padding: 40px 20px;
  }
  
  .upload-placeholder {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .upload-placeholder:hover {
    background: rgba(24, 144, 255, 0.05);
  }
  
  .upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
  }
  
  .upload-placeholder p {
    margin: 8px 0;
    color: #666;
  }
  
  .upload-tip {
    font-size: 12px !important;
    color: #999 !important;
  }
  
  /* 上传中状态 */
  .uploading-state {
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #666;
  }
  
  .uploading-state .upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
    animation: pulse 1.5s ease-in-out infinite;
  }
  
  .uploading-state p {
    margin: 4px 0;
    font-size: 14px;
  }
  
  @keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
  }
  
  /* 预览弹窗样式 */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  
  .preview-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  .modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
  }
  
  .modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
  }
  
  .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .close-btn:hover {
    color: #666;
  }
  
  .preview-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
  }
  
  .preview-homepage {
    max-width: 600px;
    margin: 0 auto;
  }
  
  .preview-banner img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
  }
  
  .preview-header {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .preview-header h1 {
    margin: 0 0 10px 0;
    color: #1890ff;
    font-size: 28px;
  }
  
  .preview-header h2 {
    margin: 0;
    color: #666;
    font-size: 18px;
    font-weight: normal;
  }
  
  .preview-welcome {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
  }
  
  .preview-welcome p {
    margin: 0;
    color: #666;
    line-height: 1.6;
  }
  
  .preview-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
  }
  
  .preview-feature {
    text-align: center;
    padding: 20px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
  }
  
  .feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
  }
  
  .preview-feature h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
  }
  
  .preview-feature p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
  }
  
  .preview-contact {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
  }
  
  .preview-contact h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 18px;
  }
  
  .preview-contact p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
  }
  
  /* 消息提示 */
  .message-toast {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    z-index: 1001;
    animation: slideIn 0.3s ease;
  }
  
  .message-toast.success {
    background: #52c41a;
  }
  
  .message-toast.error {
    background: #ff4d4f;
  }
  
  @keyframes slideIn {
    from {
      transform: translateX(100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  /* 响应式设计 */
  @media (max-width: 768px) {
    .main-content {
      flex-direction: column;
    }
  
    .sidebar {
      width: 100%;
      order: 2;
    }
  
    .content {
      order: 1;
    }
  
    .nav-menu {
      display: flex;
      overflow-x: auto;
      padding: 8px 16px;
    }
  
    .menu-item {
      white-space: nowrap;
      border-left: none;
      border-bottom: 3px solid transparent;
    }
  
    .menu-item.active {
      border-left: none;
      border-bottom-color: #1890ff;
    }
  
    .page-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 16px;
    }
  
    .preview-features {
      grid-template-columns: 1fr;
    }
  }